package com.ybxx.hr.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.StringUtils;

import com.ybxx.base.model.ReadPerson;
import com.ybxx.core.model.BaseModel;


@Entity
@Table(name="tbl_hr_user")
public class HrUser extends BaseModel {
	@Id
	private String puid;
	@ManyToOne(targetEntity=Dept.class,fetch=FetchType.EAGER)
	@JoinColumn(name="did",referencedColumnName="did") 
	private Dept dept;
	@ManyToOne(targetEntity=School.class,fetch=FetchType.EAGER)
	@JoinColumn(name="sid",referencedColumnName="sid") 
	private School school;
	@ManyToOne(targetEntity=Work.class,fetch=FetchType.EAGER)
	@JoinColumn(name="wid",referencedColumnName="wid") 
	private Work work;
	@ManyToOne(targetEntity=WorkContent.class,fetch=FetchType.EAGER)
	@JoinColumn(name="wcid",referencedColumnName="wcid") 
	private WorkContent workContent;
	@ManyToOne(targetEntity=WorkType.class,fetch=FetchType.EAGER)
	@JoinColumn(name="wtid",referencedColumnName="wtid") 
	private WorkType workType;
	private String name;
	private String birthday;
	private String sex;
	private String icard;
	private String workmoney;
	private String ctime;
	private String addr;
	private String tel;
	private String ltime;
	private String content;
	private String state;
	public String getPuid() {
		return puid;
	}
	public void setPuid(String puid) {
		this.puid = puid;
	}
	public Dept getDept() {
		return dept;
	}
	public void setDept(Dept dept) {
		this.dept = dept;
	}
	public School getSchool() {
		return school;
	}
	public void setSchool(School school) {
		this.school = school;
	}
	public Work getWork() {
		return work;
	}
	public void setWork(Work work) {
		this.work = work;
	}
	public WorkContent getWorkContent() {
		return workContent;
	}
	public void setWorkContent(WorkContent workContent) {
		this.workContent = workContent;
	}
	public WorkType getWorkType() {
		return workType;
	}
	public void setWorkType(WorkType workType) {
		this.workType = workType;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		if(StringUtils.isNotEmpty(birthday)){
			this.birthday = birthday;
		}
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getIcard() {
		return icard;
	}
	public void setIcard(String icard) {
		this.icard = icard;
	}
	public String getWorkmoney() {
		return workmoney;
	}
	public void setWorkmoney(String workmoney) {
		if(StringUtils.isNotEmpty(workmoney)){
			this.workmoney = workmoney;
		}
	}
	public String getCtime() {
		return ctime;
	}
	public void setCtime(String ctime) {
		if(StringUtils.isNotEmpty(ctime)){
			this.ctime = ctime;
		}
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getLtime() {
		return ltime;
	}
	public void setLtime(String ltime) {
		if(StringUtils.isNotEmpty(ltime)){
			this.ltime = ltime;
		}
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	
	
}

